﻿namespace Grow.EventBus
{
    public class SubscriberEventDataDto
    {
        public SubscriberEventDataDto(Guid eventDataId, string eventName, string eventHandlerName, string eventDataType, string eventHandlerType, string eventBody, string eventHeads, DateTimeOffset sendAt, DateTimeOffset? delayAt)
        {
            EventDataId = eventDataId;
            EventName = eventName;
            EventHandlerName = eventHandlerName;
            EventDataType = eventDataType;
            EventHandlerType = eventHandlerType;
            EventBody = eventBody;
            EventHeads = eventHeads;
            SendAt = sendAt;
            DelayAt = delayAt;
        }

        /// <summary>
        /// 消息id
        /// </summary>
        public Guid EventDataId { get; set; }
        /// <summary>
        /// 事件名称
        /// </summary>
        public string EventName { get; set; }

        /// <summary>
        /// 事件处理名称
        /// </summary>
        public string EventHandlerName { get; set; }


        /// <summary>
        /// 事件数据类别
        /// </summary>
        public string EventDataType { get; set; }
        /// <summary>
        /// 事件处理类别
        /// </summary>
        public string EventHandlerType { get; set; }

        /// <summary>
        /// 事件内容
        /// </summary>
        public string EventBody { get; set; }

        /// <summary>
        /// 事件附加数据
        /// </summary>
        public string EventHeads { get; set; }


        /// <summary>
        /// 发送时间
        /// </summary>
        public DateTimeOffset SendAt { get; set; }

        /// <summary>
        /// 延迟消费时间
        /// </summary>
        public DateTimeOffset? DelayAt { get; set; }
    }
}
